package cn.edu.nju.dapenti;

import android.content.Context;
import android.webkit.WebView;

public class MenuHandlerRefresh implements MenuHandlerInterface {

	public void handle(Context context) {
		if (context instanceof ShowDescription) {
			ShowDescription showDescription = (ShowDescription) context;
			WebView webView = (WebView) (showDescription.getWebView());
			webView.getSettings().setBlockNetworkImage(!showDescription.refreshIsLoadPicture());
			webView.reload();
		} else if (context instanceof RSSReader) {
			((RSSReader) context).onRefresh();
		}
	}
	

}
